package only.my.railgunys.shooting;

import only.my.railgunys.artifact.ArtifactSuitEffect;
import only.my.railgunys.artifact.imp.*;
import only.my.railgunys.bean.Character;
import only.my.railgunys.bean.Enemy;
import only.my.railgunys.bean.Weapon;
import only.my.railgunys.repository.SceneRepository;
import only.my.railgunys.utils.Crutch;
import only.my.railgunys.utils.FightUtils;
import only.my.railgunys.weapon.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

import static only.my.railgunys.preparation.SingleData.getSceneList;
import static only.my.railgunys.utils.Crutch.instructorBennett;

@Component
public class Xiangling  extends RoleScene {
    @Autowired
    SceneRepository sceneRepository;

    @Override
    public void calcWeaponData() {
//        calcArtifactSuit(new WavebreakersFin(1, 80 + 80 + 90 + 60));
//        calcArtifactSuit(new Harpoon(5));
//        calcArtifactSuit(new Deathmatch(3,1));
//        calcArtifactSuit(new Deathmatch(3,2));
//        calcArtifactSuit(new DragonsBane(5));
        calcArtifactSuit(new EngulfingLightning(1));
        calcArtifactSuit(new Homa(1));
    }

    @Override
    protected void calcArtifactSuit(Weapon weapon) {
        ArtifactSuitEffect emblem = new Emblem();
        ArtifactSuitEffect crimsonWitch = new CrimsonWitch();
        ArtifactSuitEffect gladiator = new Gladiator();
        ArtifactSuitEffect wanderersTroupe = new WanderersTroupe();

        List<Character> characters = calcSuit4(weapon, crimsonWitch);
        sceneRepository.saveAll(getSceneList(characters));

        sceneRepository.saveAll(getSceneList(calcSuit22(weapon, gladiator, wanderersTroupe)));

        List<Character> characters1 = calcSuit4(weapon, emblem);
        sceneRepository.saveAll(getSceneList(characters1));

        List<Character> characters2 = calcSuit22(weapon, crimsonWitch, gladiator);
        sceneRepository.saveAll(getSceneList(characters2));

        List<Character> characters3 = calcSuit22(weapon, crimsonWitch, wanderersTroupe);
        sceneRepository.saveAll(getSceneList(characters3));
    }

    @Override
    public void addTeam(Character character) {
        Crutch.doubleFireTeam(character);
        Crutch.instructorBennett(character);
        Crutch.vv4Kazuha(character);
    }

    @Override
    public Character initRoleBaseInfo() {
        Character xiangling = new Character();
        xiangling.setHp(10875.0);
        xiangling.setRole(6);
        xiangling.setLevel(90);
        xiangling.setAtk(225.0);
        xiangling.setSkillDmg(2.24);
        xiangling.setCritDmg(50.0);
        xiangling.setCritRate(5D);
        xiangling.setDescription("90级香菱");
        xiangling.setReaction(1.5);// 蒸发
        xiangling.setMastery(96);
        xiangling.setRecharge(100.0);
        xiangling.setAtkUseful(true);
        xiangling.setHpUseful(true);
        xiangling.setRechargeUseful(true);
        xiangling.setCritRateUseful(true);
        xiangling.setElementDmgUseful(true);
        xiangling.setMasteryUseful(true);
        return xiangling;
    }
}
